<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    {if request()->get('parent_id')}
    <div class="form-group">
        <label for="c-parent_id" class="control-label col-xs-12 col-sm-2">{:__('Parent_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-parent_id" data-rule="required" data-source="parent/index" class="form-control selectpage" name="row[parent_id]" type="text" value="{$row.parent_id}">
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label for="c-code" class="control-label col-xs-12 col-sm-2">{:__('Code')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-code" data-rule="required" class="form-control" name="row[code]" type="text" value="{$row.code}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-address" class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text" value="{$row.address}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-house_code" class="control-label col-xs-12 col-sm-2">{:__('House_code')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-house_code" data-rule="required" class="form-control" name="row[house_code]" type="text" value="{$row.house_code}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-tenant" class="control-label col-xs-12 col-sm-2">{:__('Tenant')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tenant" data-rule="required" class="form-control" name="row[tenant]" type="text" value="{$row.tenant}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-idcard" class="control-label col-xs-12 col-sm-2">{:__('Idcard')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-idcard" data-rule="required" class="form-control" name="row[idcard]" type="text" value="{$row.idcard}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-type" class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[type]', ['0'=>__('RentNew'),'1'=>__('RentRenew'),'2'=>__('RentSublet')],$row['type'])}
        </div>
    </div>
    <div class="form-group">
        <label for="c-contract" class="control-label col-xs-12 col-sm-2">{:__('Contract')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline">
                <input id="c-contract" class="form-control" size="50" name="row[contract]" type="hidden" value="{$row.contract}">
                <span><button id="plupload-image" class="btn btn-danger plupload" data-input-id="c-contract" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-preview-id="p-contract" data-multiple="true"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-multiple="true" data-mimetype="image/*" data-input-id="c-contract"><i class="fa fa-list-ul"></i> {:__('Choose')}</button></span>
                <ul class="row list-inline plupload-preview" id="p-contract"></ul>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label for="c-start_time" class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[start_time]" type="text" value="{$row.start_time|datetime}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-end_time" class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[end_time]" type="text" value="{$row.end_time|datetime}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="button" class="btn btn-default btn-embossed" onClick="closeLayerWin(this)">{:__('Close')}</button>
        </div>
    </div>
</form>
